package com.alpha.runes.core;

public enum RunesStatusCode {

    AVAILABLE(0, "加速可用"),
    AUTH_EXPIRED(1, "授权过期"),
    GAME_NOT_SUPPORT(2, "该游戏不支持加速"),
    DEVICE_NOT_SUPPORT(3, "该设备不支持加速"),
    CHANNEL_NOT_SUPPORT(4, "该渠道不支持加速");

    private final int code;
    private final String msg;

    RunesStatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static RunesStatusCode getStatus(int code) {
        for (RunesStatusCode statusCode : RunesStatusCode.values()) {
            if (statusCode.getCode() == code) {
                return statusCode;
            }
        }
        return null;
    }

}
